package com.spcloud.msg.service;

import com.spcloud.msg.kafka.MessageBinder;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Service;

/**
 * 消息处理业务类
 * @author GuoChunbo
 * @create 2020-02-27 9:09
 * @Description: 类的描述
 */
@Service
public class MsgService {

    @StreamListener("getuserreg") //input的通道名称
    public void getUserRegMsg(Message message){
        //监听接受到的消息
        System.out.println("接受到的消息:"+message.getPayload());
    }
}
